/* Ejercicio 4.16
   ejer4_16.c */
#include <stdio.h>

/* funcion main, el programa inicia aca */
int main( void )
{
    int i, j;

    printf( "a)\n" );
    for ( i = 1; i <= 10; i++ ) {

        for ( j = 1; j <= i; j++ ) {
            printf( "*" );
        }

        printf( "\n" );
    }

    printf( "b)\n" );
    for ( i = 1; i <= 10; i++ ) {

        for ( j = 10; j >= i; j-- ) {
            printf( "*" );
        }

        printf( "\n" );
    }

    printf( "c)\n" );
    for ( i = 1; i <= 10; i++ ) {

        for ( j = 1; j < i; j++ ) {
            printf( " " );
        }

        for ( j = 10; j >= i; j-- ) {
            printf( "*" );
        }

        printf( "\n" );
    }

    printf( "d)\n" );
    for ( i = 1; i <= 10; i++ ) {

        for ( j = 10; j > i; j-- ) {
            printf( " " );
        }

        for ( j = 1; j <= i; j++ ) {
            printf( "*" );
        }

        printf( "\n" );
    }
	return 0;
} /* fin de la funcion main */
